import useSWR from 'swr';
import {get} from "pages/api/http";

export default function () {
    const {data, error} = useSWR('/shops', get);

    return {
        shops:data?.data,
        loading: !error && !data,
        error
    }
}